package com.mvc.controller;

import com.mvc.entity.Result;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Controller
@RequestMapping("/user")
public class UserController {

    @RequestMapping(path = "/login", method = RequestMethod.GET)
    public String login() {
        return "成功 login";
    }

    @RequestMapping("/list")
    public Result list() {
        Result result = new Result();
        result.setCode(0);
        result.setMessage("success：处理成功");
        return result;
    }

}
